#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e5+5;
int a_d[MAXN];
int n;
int nums[MAXN];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    int ans = n;
    for(int i = 1;i <= n;i++){
        cin >> a_d[i];
        nums[a_d[i]]+=1;
    }
    sort(a_d+1,a_d+n+1);
    int M = a_d[n];
    for (int i = 2;i<=M;i++){
        if(nums[i] == 0){
            continue;
        }
        int j = i-1;
        int abl = nums[i];
        while((abl > nums[j])&(j>0)){
            ans -=nums[j];
            abl -=nums[j];
            nums[j] = 0;
            --j;
        }
        if(j!=0){
            ans -=abl;
            nums[j]-=abl;
            abl = 0;
        }
    }
    cout << ans;
}
